﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="cakerList.aspx.vb" Inherits="diy_wc_prototype.cakerList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:diycakeConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:diycakeConnectionString.ProviderName %>" 
        SelectCommand="SELECT [userLoc], [userAvgStar], [userImg], [userUName], [userDateAdded], [userAge]  FROM [cakers]"></asp:SqlDataSource>
    
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" 
        GroupItemCount="3">
                  <EmptyDataTemplate>
            <table runat="server" style="">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr ID="itemPlaceholderContainer" runat="server">
                <td ID="itemPlaceholder" runat="server">
                </td>
            </tr>
        </GroupTemplate>
             <ItemTemplate>
            <td runat="server" style=" padding:15px">
               
                <br />
                 <%# getUserAvgRating(Eval("userAvgStar"))%>
                <br />
                <img src='<%# Eval("userImg") %>' alt='' class="commentPic"/>
                <br />
      <h2><a href='cakerProfile.aspx?userUName=<%# Eval("userUName") %>'><%# Eval("userUName")%></a></h2> <br /><%# getAge(Eval("userAge"))%>
      <br />  Location
      <br />
    <a href='https://maps.google.com/maps/place?q=<%# Eval("userLoc") %>' target="_blank"><%# Eval("userLoc") %></a>
          <br />
              Joined:  
              <br />
             <%# Eval("userDateAdded", "{0:D}")%>
                <br /><br /><br />
            </td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table ID="groupPlaceholderContainer" runat="server" border="0" style="">
                            <tr ID="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="">
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
   
    </asp:ListView>
    
</asp:Content>
